package com.libra.assemble.xutil.excel.form;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 对应Excel的单元格属性.
 * Created by Libra on 15/4/15.
 */
public class CellAttributeForm {

    /**
     * 名称
     */
    private String name;

    /**
     * 排序
     */
    private Integer order;

    /**
     * 属性
     */
    private String attribute;

    /**
     * 宽度
     */
    private Integer width;

    /**
     * 格式
     */
    private String pattern;

    /**
     * 默认值
     */
    private String defaults;

    /**
     * 忽略
     */
    private Boolean ignore;

    /**
     * 映射的Key
     */
    private String key;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public Boolean isIgnore() {
        return ignore;
    }

    public void setIgnore(Boolean ignore) {
        this.ignore = ignore;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getAttribute() {
        return attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    public Integer getWidth() {
        return width;
    }

    public void setWidth(Integer width) {
        this.width = width;
    }

    public String getPattern() {
        return pattern;
    }

    public void setPattern(String pattern) {
        this.pattern = pattern;
    }

    public String getDefaults() {
        return defaults;
    }

    public void setDefaults(String defaults) {
        this.defaults = defaults;
    }

    /**
     * 覆盖toString方法，目的显示所有JavaBean的属性值，省略写很多的getXxx的方法
     */
    public String toString() {
        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.MULTI_LINE_STYLE);
    }
}
